<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>栅格布局v2</title>
    <style>
        html{
            padding: 0;
            margin: 0;
        }
        main{
            height: 100vh;
            width: 100vw;
            display: grid;
            grid-template-rows: repeat(2, 2fr);
            grid-template-columns: repeat(3, 2fr);
            gap: 20px 10px;
        }
        div{
            background-color: pink;
        }
    </style>
</head>
<body>
    <main>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </main>
</body>
</html>
